package org.example.service;

import com.github.pagehelper.PageInfo;
import org.example.ourEnum.AnnouncementStatus;
import org.example.pojo.domain.Announcement;

import java.util.List;

public interface AnnouncementService {
    void createDraft(Announcement announcement);
    Announcement getById(Integer id);
    List<Announcement> getAll();
    List<Announcement> getPublished();
    void update(Announcement announcement);
    void delete(Integer id);
    void changeStatus(Integer id, AnnouncementStatus status);
    /** 分页查询指定状态的公告 */
    PageInfo<Announcement> listByStatus(String status, int page, int size);
}
